clear all;clc
addpath(genpath('.'));  %添加工具箱路径
Cover_obj=VideoReader('./capture_video/Cmarked_6.mp4');
numFrames = Cover_obj.NumFrames;% 帧的总数
mpivot=round((numFrames-200)/2);
one_diff=[];
count=1;
 for k = 200:5: mpivot% 一阶差分，3D-DFT，3D-DWT
     % 前半组
     A_l=read_and_conversion(Cover_obj,k);
     A_r=read_and_conversion(Cover_obj,mpivot-k+1);
     % 后半组
     B_l=read_and_conversion(Cover_obj,mpivot-k);
     B_r=read_and_conversion(Cover_obj,numFrames-k+1);
     
     diff_a=abs(double(A_l)-double(A_r));
     diff_b=abs(double(B_l)-double(B_r));
     diff=abs(diff_a-diff_b);
     one_diff{count}=diff;
     count=count+1;
     if count>48 %32,64,256,个人感觉32就够用了
         save one_diff one_diff
         break;
     end
 end
 detect_corner;